﻿<?php
/* @var $this UserProfilesController */
/* @var $model UserProfiles */

$this->breadcrumbs=array(
	'User Profiles'=>array('index'),
	'Create',
);

$this->menu=array(
	array('label'=>'List UserProfiles', 'url'=>array('index')),
	array('label'=>'Manage UserProfiles', 'url'=>array('admin')),
);
?>

<h1>Create UserProfiles</h1>

<?php $this->renderPartial('_form2', array('model'=>$model)); ?>

<a href="#/" id="fake_button">Show Content</a>

<?php 
	echo CHtml::link('Show', '#/', array(
		'onclick'=>'$("#file_name").val();' . 
		'var directory = "/exread.php";' . 
		'$("#show_content").load(directory, {"filename":files_name});'
		)); 

?>

<input type="hidden" id="file_name" value="<?php echo $file_name; ?>"/>
<?php 
	$js2 = "
		$('#fake_button').click(function(){
				var files_name = $('#file_name').val();
				var directory = 'C:/xampp/htdocs/distancelearning.kz/protected/modules/teacher/files/student_lists/exread.php';
				$('#show_content').load(directory, {'filename':files_name});
			});
	";
	//Yii::app()->clientScript->registerScript('ShowContent1', $js2, CClientScript::POS_READY);
 ?>
<script type="text/javascript">
	$(document).ready(function(e) {
        $('#fake_button').click(function(event){
				var files_name = $('#file_name').val();
				$.post('exread.php', function( data ){
						alert( "Data Loaded " + data);
					});
			});
    });
</script>
 
 <div id="show_content">
 	Content
 </div>